<div id="rule-cash"></div>
<input type="hidden" id="cash_dates" name="cash_dates" value="{{$cash_dates?implode(",",$cash_dates):''}}">
<script init="@rule-cash">
    Dcat.ready(function () {
        window.appInit("#rule-cash",{
            template:`
                <n-cascader
                    v-model:value="dates"
                    multiple
                    clearable
                    show-path
                    check-strategy="child"
                    placeholder="请选择允许提现的时间"
                    max-tag-count="responsive"
                    :options="options"
                    @update:value="onUpdate"
                ></n-cascader>
                <input type="hidden" name="cash_dates" v-model="dates">
`,
            setup(){
                const options = @json($options);
                const dates = Vue.ref(@json($cash_dates));
                return {
                    dates,
                    options,
                    onUpdate:(e)=>{
                        $("#cash_dates").val(e.join(','))
                    }
                }
            }
        })
    });
</script>

